#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
int main1() {
    int h, m, s;
    scanf("%d", &s);
    h = s / 60 / 60;
    m = s / 60 % 60;
    s = s % 60;
    printf("%d %d %d", h, m, s);
    return 0;
}
int main()
{
    int M = 0;
    scanf("%d", &M);
    if (M % 5 == 0)
        printf("YES");
    else
        printf("NO");

    return 0;
}

